/*
Copyright 2023 Sangfor Technologies Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package operations

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"net/http"

	"github.com/go-openapi/runtime"

	"arsenal/models"
)

// GetFaultsOKCode is the HTTP code returned for type GetFaultsOK
const GetFaultsOKCode int = 200

/*
GetFaultsOK Response successfully

swagger:response getFaultsOK
*/
type GetFaultsOK struct {

	/*
	  In: Body
	*/
	Payload *models.Infos200Response `json:"body,omitempty"`
}

// NewGetFaultsOK creates GetFaultsOK with default headers values
func NewGetFaultsOK() *GetFaultsOK {

	return &GetFaultsOK{}
}

// WithPayload adds the payload to the get faults o k response
func (o *GetFaultsOK) WithPayload(payload *models.Infos200Response) *GetFaultsOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get faults o k response
func (o *GetFaultsOK) SetPayload(payload *models.Infos200Response) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *GetFaultsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(200)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err) // let the recovery middleware deal with this
		}
	}
}

// GetFaultsNotFoundCode is the HTTP code returned for type GetFaultsNotFound
const GetFaultsNotFoundCode int = 404

/*
GetFaultsNotFound No fault's information found

swagger:response getFaultsNotFound
*/
type GetFaultsNotFound struct {

	/*
	  In: Body
	*/
	Payload *models.Error404Response `json:"body,omitempty"`
}

// NewGetFaultsNotFound creates GetFaultsNotFound with default headers values
func NewGetFaultsNotFound() *GetFaultsNotFound {

	return &GetFaultsNotFound{}
}

// WithPayload adds the payload to the get faults not found response
func (o *GetFaultsNotFound) WithPayload(payload *models.Error404Response) *GetFaultsNotFound {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get faults not found response
func (o *GetFaultsNotFound) SetPayload(payload *models.Error404Response) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *GetFaultsNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(404)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err) // let the recovery middleware deal with this
		}
	}
}

// GetFaultsInternalServerErrorCode is the HTTP code returned for type GetFaultsInternalServerError
const GetFaultsInternalServerErrorCode int = 500

/*
GetFaultsInternalServerError Server error while processing the request

swagger:response getFaultsInternalServerError
*/
type GetFaultsInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *models.Error500Response `json:"body,omitempty"`
}

// NewGetFaultsInternalServerError creates GetFaultsInternalServerError with default headers values
func NewGetFaultsInternalServerError() *GetFaultsInternalServerError {

	return &GetFaultsInternalServerError{}
}

// WithPayload adds the payload to the get faults internal server error response
func (o *GetFaultsInternalServerError) WithPayload(payload *models.Error500Response) *GetFaultsInternalServerError {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get faults internal server error response
func (o *GetFaultsInternalServerError) SetPayload(payload *models.Error500Response) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *GetFaultsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(500)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err) // let the recovery middleware deal with this
		}
	}
}
